package com.artPreter.controller;


import com.artPreter.pojo.EventExhibitionContentSection;
import com.artPreter.pojo.Result;
import com.artPreter.service.IEventExhibitionContentSectionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 活动展览栏目内容表 前端控制器
 * </p>
 *
 * @author jarvis
 * @since 2025-01-07
 */
@RestController
@RequestMapping("/eventExhibitionContentSection")
public class EventExhibitionContentSectionController {

    @Autowired
    private IEventExhibitionContentSectionService eventExhibitionContentSectionService;


    /**
     * 内容栏目表列表
     * @param
     * @return
     */
    @PostMapping("/getList")
    public Result getList(@RequestBody EventExhibitionContentSection eventExhibitionContentSection){
        List<EventExhibitionContentSection> result = eventExhibitionContentSectionService.getList(eventExhibitionContentSection);
        return Result.success(result);
    }

    /**
     * 编辑内容栏目表
     * @param eventExhibitionContentSection
     * @return
     */
    @PostMapping("/edit")
    public Result edit(@RequestBody EventExhibitionContentSection eventExhibitionContentSection){
        eventExhibitionContentSectionService.edit(eventExhibitionContentSection);
        return Result.success("编辑成功");
    }

}
